INCLUDES:=./
SRCS:=$(wildcard *.cc)
LIBS:= -lwfrest -lworkflow -lssl -lcrypto -lcrypt -lpthread -lSimpleAmqpClient -lsrpc -lprotobuf
OBJS:=$(patsubst %.cc, %.o, $(SRCS))
ABLIBABALIBS:= -fno-rtti -lalibabacloud-oss-cpp-sdk -lcurl
SERVER:=wfrest_server.exe

$(SERVER): main.o hash.o token.o user.pb.o 
	g++ $^ -o $@ $(LIBS) $(addprefix -I, $(INCLUDES)) -g

%.o:%.cc
	g++ -c $^ -o $@ $(LIBS) $(addprefix -I, $(INCLUDES)) -g

hash.exe:
	g++ hash.cc testHash.cc -o $@ -lssl -lcrypto
token.exe:
	g++ token.cc testToken.cc -o $@ -lssl -lcrypto
consumer.exe:
	g++ consumer.cc oss.cc -o $@ $(ABLIBABALIBS) $(LIBS)

clean:
	rm -rf $(OBJS) $(SERVER) hash token
